package Server;

import java.sql.Connection;
import java.sql.DriverManager;

public class PolaczenieMSSQL2005 implements PolaczenieBazyDanych
    {
    public Connection getConnection() throws Exception
        {
        try
            {
            Class.forName( "com.microsoft.sqlserver.jdbc.SQLServerDriver" );
    
            String connectionUrl = "jdbc:sqlserver://localhost:1433;"
                    + "databaseName=Biblioteka;user=ztsr;password=corba;";
            return DriverManager.getConnection( connectionUrl );
            }
        catch( Exception e )
            {
            e.printStackTrace( System.out );
            throw e;
            }
        }

    }
